﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="WebApplication1.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
    <form id="form1" runat="server">
        <div id ="father">
            <div>
                <asp:Label ID="Label1" runat="server" Text="注册界面" Font-Bold="True" Font-Size="35px"></asp:Label>
            </div>
            <div id="left" style="float:left; width:120px; text-align:left";>
                <div style="height:30px ;">账号：</div>
                <div style="height:30px ;">密码：</div>
                <div style="height:30px ;">再次输入密码：</div>
                <div style="height:30px ;">年龄：</div>
                <div style="height:30px ;">出生日期：</div>
                <div style="height:30px ;">毕业时间：</div>
                <div style="height:30px ;">邮箱：</div>
                <div style="height:30px ;">头像：</div>
            </div>
            <div id="right"">
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="用户名不能为空！" Font-Bold="True" ForeColor="#CC0000" Display="Dynamic" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>

                    <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="用户名不能是admin！" OnServerValidate="CustomValidator1_ServerValidate" ControlToValidate="TextBox1" Display="Dynamic"></asp:CustomValidator>

                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空！" Display="Dynamic" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox3" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="请再次输入密码！" Display="Dynamic" ControlToValidate="TextBox3"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="俩次密码不一致！" ControlToCompare="TextBox2" ControlToValidate="TextBox3" Display="Dynamic"></asp:CompareValidator>
                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="RangeValidator" ControlToValidate="TextBox4" Display="Dynamic" MaximumValue="150" MinimumValue="0" Type="Integer">年龄超出0~150的范围！</asp:RangeValidator>
                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                    <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="出生日期超出1990-01-01~当前时间的范围！" ControlToValidate="TextBox5" Display="Dynamic" MinimumValue="1990-01-01" Type="Date"></asp:RangeValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox5" Display="Dynamic" ErrorMessage="格式不正确！" ValidationExpression="\d{4}-\d{2}-\d{2}"></asp:RegularExpressionValidator>

                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>

                    <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="TextBox5" ControlToValidate="TextBox6" Display="Dynamic" ErrorMessage="毕业时间不能早于出生日期！" Operator="GreaterThan"></asp:CompareValidator>

                </div>
                <div style="height:30px ;">
                    <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>

                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox7" ErrorMessage="格式不正确！" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>

                </div>
                <div>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    
                    <asp:Image ID="Image1" runat="server" />
                </div>
                
            </div>
            <div style="float:left">
                <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </div>
            <br/>
            <br/>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="SingleParagraph" />
        </div>
    </form>
</body>
</html>
